package org.example.seat_management.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.seat_management.Entity.SeatInfo;

import java.util.List;

@Mapper
public interface SeatInfoMapper {
    int batchInsert(@Param("list") List<SeatInfo> list);
    int batchUpsert(@Param("list") List<SeatInfo> list);
    int upsert(SeatInfo entity);
    int update(SeatInfo entity);
    int softDeleteById(@Param("id") Long id);
    SeatInfo findByPosition(@Param("classroomId") Long classroomId,
                            @Param("section") String section,
                            @Param("columnIndex") Integer columnIndex,
                            @Param("rowIndex") Integer rowIndex);
    List<SeatInfo> listByClassroom(@Param("classroomId") Long classroomId);
}


